import request from '@/utils/request'

export default {
   // current: 当前页  limit：每页记录数  staffQuery：条件对象
    getStaffListPage(current, limit, staffQuery) {
        return request({
           url: `/manager/staff/pageStaffCondition/${current}/${limit}`,
            method: 'post',
           //data: 表示对象转换json进行传递到接口里面
            data: staffQuery
        })
    },
   deleteStaffId(id) {
        return request({
            url: `/manager/staff/${id}`,
            method: 'delete'
        })
    },
   addStaff(staff) {
        return request({
            url: `/manager/staff/addStaff`,
            method: 'post',
            data: staff
        })
    },
   getStaffInfo(id) {
        return request({
            url: `/manager/staff/getStaff/${id}`,
            method: 'get'
        })
    },
   updateStaff(staff) {
        return request({
            url: `/manager/staff/updateStaff`,
            method: 'post',
            data: staff
        })
    }
}
